Description


Edgar Anderson’s Iris Data

This famous (Fisher’s or Anderson’s) iris data set gives the measurements in centimeters of the variables sepal length and width and petal length and width, respectively, for 50 flowers from each of 3 species of iris. The species are Iris setosa, versicolor, and virginica. iris is a data frame with 150 cases (rows) and 5 variables (columns) named Sepal.Length, Sepal.Width, Petal.Length, Petal.Width, and Species.

References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole. (has iris3 as iris.)


Data Table

This table is generated by DataTables (https://rstudio.github.io/DT/).

Exploratory Data analytics (EDA)

Column

Here is an area for some illustration

Column

Chart A: Distribution of Sepal Length

Chart B: Distribution of Sepal Width

Column

Chart C: Distribution of Petal Length

Chart D: Distribution of Petal Width

Setosa

Column

Explaination

corrplot

Column

Chart 1: Sepal.Length vs. Sepal.Width

Chart 2: Sepal.Length vs. Petal.Length

Chart 3: Sepal.Length vs. Petal.Width

Column {data-width=500}

Chart 4: Sepal.Width vs. Petal.Length

Chart 5: Sepal.Width vs. Petal.Width

Chart 6: Petal.Length vs. Petal.Width

Versicolor

Column

Correlation Plot

Column

Chart 1: Sepal.Length vs. Petal.Length

Chart 2: Petal.Length vs. Petal.Width

Virginica

Column


some information

Correlation Plot

Column

Chart 1: Sepal.Length vs. Petal.Length

Chart 2: Sepal.Width vs. Petal.Width

Other

Row

Articles per Day

5

Comments per Day

5

Spam per Day

15

Row2

Contact Rate

Average Rating

Cancellations

Row3

---
title: "Iris Example"
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
    navbar:
      - { title: "About", href: "https://example.com/about", align: right }
    social: [ "twitter", "facebook", "menu" ]
    source_code: embed
    theme: yeti
---

```{r setup, include=FALSE}
library(flexdashboard)
library(dplyr)
library(plotly)
library(ggplot2)
library(DT)
library(reshape2)
data("iris")
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
```

Description{dat-orientation=rows}
========================================================================
![](../images/iris-machinelearning.png){width=50%}
*** #### Edgar Anderson's Iris Data This famous (Fisher's or Anderson's) iris data set gives the measurements in centimeters of the variables sepal length and width and petal length and width, respectively, for 50 flowers from each of 3 species of iris. The species are Iris setosa, versicolor, and virginica. iris is a data frame with 150 cases (rows) and 5 variables (columns) named Sepal.Length, Sepal.Width, Petal.Length, Petal.Width, and Species. #### References Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole. (has iris3 as iris.) *** ### Data Table{.no-title} ```{r} datatable(iris, options = list(pageLength = 5)) ``` >This table is generated by DataTables (https://rstudio.github.io/DT/). Exploratory Data analytics (EDA) ======================================================================== Column {data-width=250} ----------------------------------------------------------------------- Here is an area for some illustration Column {data-width=500} ----------------------------------------------------------------------- ### Chart A: Distribution of Sepal Length ```{r} ggplotly( ggplot(data=iris, aes(x=Sepal.Length, fill=Species))+geom_histogram(color='black', position = 'stack')+theme_bw()+labs(x='Sepal Length', y='Frequency', main='Distribution of Sepal Length') ) ``` ### Chart B: Distribution of Sepal Width ```{r} ggplotly( ggplot(data=iris, aes(x=Sepal.Width, fill=Species))+geom_histogram(color='black', position = 'stack')+theme_bw()+labs(x='Sepal Width', y='Frequency', main='Distribution of Sepal Width') ) ``` Column {data-width=500} ----------------------------------------------------------------------- ### Chart C: Distribution of Petal Length ```{r} ggplotly( ggplot(data=iris, aes(x=Petal.Length, fill=Species))+geom_histogram(color='black', position = 'stack')+theme_bw()+labs(x='Petal Length', y='Frequency', main='Distribution of Petal Length') ) ``` ### Chart D: Distribution of Petal Width ```{r} ggplotly( ggplot(data=iris, aes(x=Petal.Width, fill=Species))+geom_histogram(color='black', position = 'stack')+theme_bw()+labs(x='Petal Width', y='Frequency', main='Distribution of Petal Width') ) ``` Setosa {data-navmenu="EDA on Species" data-icon="fa-lemon-o"} ======================================================================== Column {data-width=500} ----------------------------------------------------------------------- ### Explaination ### corrplot ```{r} corr <- round(cor(iris%>% filter(Species=='setosa')%>%select(-Species) ), 2) ggplotly(ggplot(data = melt(corr), aes(x=Var1, y=Var2, fill=value))+geom_tile()+scale_fill_continuous(limits = c(0,1))) ``` Column {data-width=500} ----------------------------------------------------------------------- ### Chart 1: Sepal.Length vs. Sepal.Width ```{r} ggplotly( ggplot(data = iris%>% filter(Species=='setosa'), aes(x=Sepal.Length, y=Sepal.Width))+geom_point()+geom_smooth(method = 'lm')+theme_bw() ) ``` ### Chart 2: Sepal.Length vs. Petal.Length ```{r} ggplotly( ggplot(data = iris%>% filter(Species=='setosa'), aes(x=Sepal.Length, y=Petal.Length))+geom_point()+geom_smooth(method = 'lm')+theme_bw() ) ``` ### Chart 3: Sepal.Length vs. Petal.Width ```{r} ggplotly( ggplot(data = iris%>% filter(Species=='setosa'), aes(x=Sepal.Length, y=Petal.Width))+geom_point()+geom_smooth(method = 'lm')+theme_bw() ) ``` Column {data-width=500}{.tabset} ----------------------------------------------------------------------- ### Chart 4: Sepal.Width vs. Petal.Length ```{r} ggplotly( ggplot(data = iris%>% filter(Species=='setosa'), aes(x=Sepal.Width, y=Petal.Length))+geom_smooth(method = 'lm')+geom_point()+theme_bw() ) ``` ### Chart 5: Sepal.Width vs. Petal.Width ```{r} ggplotly( ggplot(data = iris%>% filter(Species=='setosa'), aes(x=Sepal.Width, y=Petal.Width))+geom_smooth(method = 'lm')+geom_point()+theme_bw() ) ``` ### Chart 6: Petal.Length vs. Petal.Width ```{r} ggplotly( ggplot(data = iris%>% filter(Species=='setosa'), aes(x=Petal.Length, y=Petal.Width))+geom_smooth(method = 'lm')+geom_point()+theme_bw() ) ``` Versicolor {data-navmenu="EDA on Species" data-icon="fa-pagelines"} ======================================================================== Column {data-width=500} --------------------------------------------------------- ### Correlation Plot ```{r} corr <- round(cor(iris%>% filter(Species=='versicolor')%>%select(-Species) ), 2) ggplotly(ggplot(data = melt(corr), aes(x=Var1, y=Var2, fill=value))+geom_tile()+scale_fill_continuous(limits = c(0,1))) ``` Column {data-width=250} --------------------------------------------------------- ### Chart 1: Sepal.Length vs. Petal.Length ```{r} ggplotly( ggplot(data = iris%>% filter(Species=='versicolor'), aes(x=Sepal.Length, y=Petal.Length))+geom_point()+geom_smooth(method = 'lm')+theme_bw() ) ``` ### Chart 2: Petal.Length vs. Petal.Width ```{r} ggplotly( ggplot(data = iris%>% filter(Species=='versicolor'), aes(x=Petal.Length, y=Petal.Width))+geom_point()+geom_smooth(method = 'lm')+theme_bw() ) ``` Virginica {data-navmenu="EDA on Species" data-icon="fa-leaf"} ======================================================================== Column {data-width=250} --------------------------------------------------------- *** some information ### Correlation Plot ```{r} corr <- round(cor(iris%>% filter(Species=='virginica')%>%select(-Species) ), 2) ggplotly(ggplot(data = melt(corr), aes(x=Var1, y=Var2, fill=value))+geom_tile()+scale_fill_continuous(limits = c(0,1))) ``` Column {data-width=250} --------------------------------------------------------- ### Chart 1: Sepal.Length vs. Petal.Length ```{r} ggplotly( ggplot(data = iris%>% filter(Species=='versicolor'), aes(x=Sepal.Length, y=Petal.Length))+geom_point()+geom_smooth(method = 'lm')+theme_bw() ) ``` ### Chart 2: Sepal.Width vs. Petal.Width ```{r} ggplotly( ggplot(data = iris%>% filter(Species=='versicolor'), aes(x=Sepal.Width, y=Petal.Width))+geom_point()+geom_smooth(method = 'lm')+theme_bw() ) ``` Other {dat-orientation=rows} ========================================================================== Row ----------------------------------------------------------------------- ### Articles per Day ```{r} valueBox(5, icon = "fa-pencil") ``` ### Comments per Day ```{r} valueBox(5, icon = "fa-comments") ``` ### Spam per Day ```{r} spam = 15 valueBox(spam, icon = "fa-trash",color = ifelse(spam > 10, "warning", "primary")) ``` Row2 ----------------------------------------------------------------------- ### Contact Rate ```{r} rate <- 15 gauge(rate, min = 0, max = 100, symbol = '%', gaugeSectors( success = c(80, 100), warning = c(40, 79), danger = c(0, 39) )) ``` ### Average Rating ```{r} rating <- 15 gauge(rating, min = 0, max = 50, gaugeSectors( success = c(41, 50), warning = c(21, 40), danger = c(0, 20) )) ``` ### Cancellations ```{r} cancellations <- 15 gauge(cancellations, min = 0, max = 10, gaugeSectors( success = c(0, 2), warning = c(3, 6), danger = c(7, 10) )) ``` Row3 -----------------------------------------------------------------------